package c.j.a.d.a.j;

import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import c.j.a.c.y.a.i;
import c.j.a.d.b.o.c;
import com.ss.android.socialbase.appdownloader.DownloadHandlerService;

/* compiled from: AppNotificationItem */
public class a extends c {
    public final Context j;
    public final Resources k;
    public String l;

    public a(Context context, int i, String str, String str2, String str3, String str4) {
        super(i, str);
        this.l = str4;
        context = context.getApplicationContext();
        this.j = context;
        this.k = context.getResources();
    }

    public void c(com.ss.android.socialbase.downloader.e.a aVar, boolean z) {
        if (this.j != null) {
            try {
                Notification g = g(aVar, z);
                this.i = g;
                b(g);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public void d(com.ss.android.socialbase.downloader.g.c cVar) {
        super.d(cVar);
        this.l = cVar.h;
    }

    public final PendingIntent e(String str, int i, int i2) {
        Intent intent = new Intent(this.j, DownloadHandlerService.class);
        intent.setAction(str);
        intent.putExtra("extra_click_download_ids", i2);
        intent.putExtra("extra_click_download_type", i);
        intent.putExtra("extra_from_notification", true);
        return PendingIntent.getService(this.j, i2, intent, 134217728);
    }

    public final int f(int i) {
        if (c.j.a.d.b.l.a.d(i).b("enable_notification_ui", 0) == 1) {
            return i.z("appdownloader_download_progress_new");
        }
        return i.z("appdownloader_download_progress");
    }

    /* JADX WARNING: Removed duplicated region for block: B:166:0x03cd  */
    /* JADX WARNING: Removed duplicated region for block: B:157:0x03aa  */
    /* JADX WARNING: Removed duplicated region for block: B:79:0x0152  */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x0190 A:{Catch:{ all -> 0x01aa }} */
    /* JADX WARNING: Removed duplicated region for block: B:93:0x01ed  */
    /* JADX WARNING: Removed duplicated region for block: B:96:0x0218  */
    /* JADX WARNING: Removed duplicated region for block: B:99:0x0226  */
    /* JADX WARNING: Removed duplicated region for block: B:176:0x0453  */
    /* JADX WARNING: Removed duplicated region for block: B:172:0x043f  */
    /* JADX WARNING: Removed duplicated region for block: B:180:0x0499  */
    /* JADX WARNING: Removed duplicated region for block: B:179:0x0495  */
    /* JADX WARNING: Removed duplicated region for block: B:184:0x04dd  */
    /* JADX WARNING: Removed duplicated region for block: B:183:0x04d3  */
    /* JADX WARNING: Removed duplicated region for block: B:188:0x0519  */
    /* JADX WARNING: Removed duplicated region for block: B:187:0x0517  */
    /* JADX WARNING: Removed duplicated region for block: B:192:0x0525  */
    /* JADX WARNING: Removed duplicated region for block: B:191:0x0523  */
    /* JADX WARNING: Removed duplicated region for block: B:196:0x0533  */
    /* JADX WARNING: Removed duplicated region for block: B:195:0x0531  */
    /* JADX WARNING: Removed duplicated region for block: B:200:0x0561  */
    /* JADX WARNING: Removed duplicated region for block: B:199:0x055f  */
    /* JADX WARNING: Removed duplicated region for block: B:264:0x05d9 A:{SYNTHETIC, EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  } */
    /* JADX WARNING: Removed duplicated region for block: B:204:0x058d  */
    /* JADX WARNING: Removed duplicated region for block: B:219:0x05dd  */
    /* JADX WARNING: Removed duplicated region for block: B:223:0x061d A:{LOOP_END, LOOP:1: B:221:0x0617->B:223:0x061d} */
    /* JADX WARNING: Removed duplicated region for block: B:226:0x062f  */
    /* JADX WARNING: Removed duplicated region for block: B:243:0x06ce  */
    /* JADX WARNING: Removed duplicated region for block: B:242:0x06c3  */
    /* JADX WARNING: Removed duplicated region for block: B:246:0x06d3  */
    /* JADX WARNING: Removed duplicated region for block: B:251:0x0700  */
    /* JADX WARNING: Removed duplicated region for block: B:255:0x0711  */
    /* JADX WARNING: Removed duplicated region for block: B:254:0x070c  */
    /* JADX WARNING: Removed duplicated region for block: B:261:0x072d  */
    /* JADX WARNING: Removed duplicated region for block: B:260:0x0723  */
    /* JADX WARNING: Removed duplicated region for block: B:71:0x0138  */
    /* JADX WARNING: Removed duplicated region for block: B:79:0x0152  */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x0190 A:{Catch:{ all -> 0x01aa }} */
    /* JADX WARNING: Removed duplicated region for block: B:93:0x01ed  */
    /* JADX WARNING: Removed duplicated region for block: B:96:0x0218  */
    /* JADX WARNING: Removed duplicated region for block: B:99:0x0226  */
    /* JADX WARNING: Removed duplicated region for block: B:105:0x0251  */
    /* JADX WARNING: Removed duplicated region for block: B:172:0x043f  */
    /* JADX WARNING: Removed duplicated region for block: B:176:0x0453  */
    /* JADX WARNING: Removed duplicated region for block: B:179:0x0495  */
    /* JADX WARNING: Removed duplicated region for block: B:180:0x0499  */
    /* JADX WARNING: Removed duplicated region for block: B:183:0x04d3  */
    /* JADX WARNING: Removed duplicated region for block: B:184:0x04dd  */
    /* JADX WARNING: Removed duplicated region for block: B:187:0x0517  */
    /* JADX WARNING: Removed duplicated region for block: B:188:0x0519  */
    /* JADX WARNING: Removed duplicated region for block: B:191:0x0523  */
    /* JADX WARNING: Removed duplicated region for block: B:192:0x0525  */
    /* JADX WARNING: Removed duplicated region for block: B:195:0x0531  */
    /* JADX WARNING: Removed duplicated region for block: B:196:0x0533  */
    /* JADX WARNING: Removed duplicated region for block: B:199:0x055f  */
    /* JADX WARNING: Removed duplicated region for block: B:200:0x0561  */
    /* JADX WARNING: Removed duplicated region for block: B:204:0x058d  */
    /* JADX WARNING: Removed duplicated region for block: B:264:0x05d9 A:{SYNTHETIC, EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  } */
    /* JADX WARNING: Removed duplicated region for block: B:219:0x05dd  */
    /* JADX WARNING: Removed duplicated region for block: B:223:0x061d A:{LOOP_END, LOOP:1: B:221:0x0617->B:223:0x061d} */
    /* JADX WARNING: Removed duplicated region for block: B:226:0x062f  */
    /* JADX WARNING: Removed duplicated region for block: B:242:0x06c3  */
    /* JADX WARNING: Removed duplicated region for block: B:243:0x06ce  */
    /* JADX WARNING: Removed duplicated region for block: B:246:0x06d3  */
    /* JADX WARNING: Removed duplicated region for block: B:251:0x0700  */
    /* JADX WARNING: Removed duplicated region for block: B:254:0x070c  */
    /* JADX WARNING: Removed duplicated region for block: B:255:0x0711  */
    /* JADX WARNING: Removed duplicated region for block: B:260:0x0723  */
    /* JADX WARNING: Removed duplicated region for block: B:261:0x072d  */
    /* JADX WARNING: Removed duplicated region for block: B:40:0x00c5  */
    /* JADX WARNING: Removed duplicated region for block: B:71:0x0138  */
    /* JADX WARNING: Removed duplicated region for block: B:79:0x0152  */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x0190 A:{Catch:{ all -> 0x01aa }} */
    /* JADX WARNING: Removed duplicated region for block: B:93:0x01ed  */
    /* JADX WARNING: Removed duplicated region for block: B:96:0x0218  */
    /* JADX WARNING: Removed duplicated region for block: B:99:0x0226  */
    /* JADX WARNING: Removed duplicated region for block: B:105:0x0251  */
    /* JADX WARNING: Removed duplicated region for block: B:176:0x0453  */
    /* JADX WARNING: Removed duplicated region for block: B:172:0x043f  */
    /* JADX WARNING: Removed duplicated region for block: B:180:0x0499  */
    /* JADX WARNING: Removed duplicated region for block: B:179:0x0495  */
    /* JADX WARNING: Removed duplicated region for block: B:184:0x04dd  */
    /* JADX WARNING: Removed duplicated region for block: B:183:0x04d3  */
    /* JADX WARNING: Removed duplicated region for block: B:188:0x0519  */
    /* JADX WARNING: Removed duplicated region for block: B:187:0x0517  */
    /* JADX WARNING: Removed duplicated region for block: B:192:0x0525  */
    /* JADX WARNING: Removed duplicated region for block: B:191:0x0523  */
    /* JADX WARNING: Removed duplicated region for block: B:196:0x0533  */
    /* JADX WARNING: Removed duplicated region for block: B:195:0x0531  */
    /* JADX WARNING: Removed duplicated region for block: B:200:0x0561  */
    /* JADX WARNING: Removed duplicated region for block: B:199:0x055f  */
    /* JADX WARNING: Removed duplicated region for block: B:264:0x05d9 A:{SYNTHETIC, EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  , EDGE_INSN: B:264:0x05d9->B:217:0x05d9 ?: BREAK  } */
    /* JADX WARNING: Removed duplicated region for block: B:204:0x058d  */
    /* JADX WARNING: Removed duplicated region for block: B:219:0x05dd  */
    /* JADX WARNING: Removed duplicated region for block: B:223:0x061d A:{LOOP_END, LOOP:1: B:221:0x0617->B:223:0x061d} */
    /* JADX WARNING: Removed duplicated region for block: B:226:0x062f  */
    /* JADX WARNING: Removed duplicated region for block: B:243:0x06ce  */
    /* JADX WARNING: Removed duplicated region for block: B:242:0x06c3  */
    /* JADX WARNING: Removed duplicated region for block: B:246:0x06d3  */
    /* JADX WARNING: Removed duplicated region for block: B:251:0x0700  */
    /* JADX WARNING: Removed duplicated region for block: B:255:0x0711  */
    /* JADX WARNING: Removed duplicated region for block: B:254:0x070c  */
    /* JADX WARNING: Removed duplicated region for block: B:261:0x072d  */
    /* JADX WARNING: Removed duplicated region for block: B:260:0x0723  */
    public final android.app.Notification g(com.ss.android.socialbase.downloader.e.a r23, boolean r24) {
        /*
        r22 = this;
        r1 = r22;
        r2 = r23;
        r3 = "setBackgroundColor";
        r4 = android.os.Build.VERSION.SDK_INT;
        r5 = r1.e;
        r6 = c.j.a.d.a.h.b(r5);
        r7 = 0;
        if (r6 != 0) goto L_0x0012;
    L_0x0011:
        return r7;
    L_0x0012:
        r0 = c.j.a.d.a.i.j();
        java.util.Objects.requireNonNull(r0);
        r8 = 3;
        r9 = 26;
        r10 = 0;
        if (r4 >= r9) goto L_0x0028;
    L_0x001f:
        r0 = new b.i.b.h;
        r11 = r1.j;
        r0.m458init(r11, r7);
    L_0x0026:
        r11 = r0;
        goto L_0x0072;
    L_0x0028:
        r0 = android.text.TextUtils.isEmpty(r7);
        r11 = "111111";
        if (r0 == 0) goto L_0x005a;
    L_0x0030:
        r0 = r1.j;
        r12 = c.j.a.d.a.h.a;	 Catch:{ all -> 0x0055 }
        if (r12 != 0) goto L_0x005b;
    L_0x0036:
        r12 = new android.app.NotificationChannel;	 Catch:{ all -> 0x0055 }
        r13 = "channel_appdownloader";
        r12.<init>(r11, r13, r8);	 Catch:{ all -> 0x0055 }
        c.j.a.d.a.h.a = r12;	 Catch:{ all -> 0x0055 }
        r12.setSound(r7, r7);	 Catch:{ all -> 0x0055 }
        r12 = c.j.a.d.a.h.a;	 Catch:{ all -> 0x0055 }
        r12.setShowBadge(r10);	 Catch:{ all -> 0x0055 }
        r12 = "notification";
        r0 = r0.getSystemService(r12);	 Catch:{ all -> 0x0055 }
        r0 = (android.app.NotificationManager) r0;	 Catch:{ all -> 0x0055 }
        r12 = c.j.a.d.a.h.a;	 Catch:{ all -> 0x0055 }
        r0.createNotificationChannel(r12);	 Catch:{ all -> 0x0055 }
        goto L_0x005b;
    L_0x0055:
        r0 = move-exception;
        r0.printStackTrace();
        goto L_0x005b;
    L_0x005a:
        r11 = r7;
    L_0x005b:
        r0 = c.j.a.d.a.i.j();	 Catch:{ NoSuchMethodError -> 0x006a }
        java.util.Objects.requireNonNull(r0);	 Catch:{ NoSuchMethodError -> 0x006a }
        r0 = new b.i.b.h;	 Catch:{ NoSuchMethodError -> 0x006a }
        r12 = r1.j;	 Catch:{ NoSuchMethodError -> 0x006a }
        r0.m458init(r12, r11);	 Catch:{ NoSuchMethodError -> 0x006a }
        goto L_0x0026;
    L_0x006a:
        r0 = new b.i.b.h;
        r11 = r1.j;
        r0.m458init(r11, r7);
        goto L_0x0026;
    L_0x0072:
        r12 = r1.f;
        r14 = 0;
        r0 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1));
        if (r0 != 0) goto L_0x0080;
    L_0x007a:
        r12 = java.lang.System.currentTimeMillis();
        r1.f = r12;
    L_0x0080:
        r12 = r1.f;
        r0 = r11.l;
        r0.when = r12;
        r12 = r1.a;
        r13 = c.j.a.d.b.l.a.d(r12);
        r7 = 24;
        r9 = 1;
        if (r4 < r7) goto L_0x009f;
    L_0x0091:
        r0 = "set_notification_group";
        r0 = r13.b(r0, r10);
        if (r0 != r9) goto L_0x009f;
    L_0x0099:
        r0 = "com.ss.android.socialbase.APP_DOWNLOADER";
        r11.g = r0;
        r11.h = r10;
    L_0x009f:
        r0 = "android";
        r7 = 2;
        r14 = 4;
        if (r6 == r9) goto L_0x00bc;
    L_0x00a5:
        if (r6 != r14) goto L_0x00a8;
    L_0x00a7:
        goto L_0x00bc;
    L_0x00a8:
        if (r6 != r7) goto L_0x00b1;
    L_0x00aa:
        r15 = "stat_sys_warning";
        r0 = c.j.a.c.y.a.i.b(r15, r0);
        goto L_0x00c2;
    L_0x00b1:
        if (r6 != r8) goto L_0x00ba;
    L_0x00b3:
        r15 = "stat_sys_download_done";
        r0 = c.j.a.c.y.a.i.b(r15, r0);
        goto L_0x00c2;
    L_0x00ba:
        r15 = 0;
        goto L_0x00c3;
    L_0x00bc:
        r15 = "stat_sys_download";
        r0 = c.j.a.c.y.a.i.b(r15, r0);
    L_0x00c2:
        r15 = r0;
    L_0x00c3:
        if (r15 == 0) goto L_0x00c9;
    L_0x00c5:
        r0 = r11.l;
        r0.icon = r15;
    L_0x00c9:
        r0 = "android.ss.intent.action.DOWNLOAD_DELETE";
        r10 = -1;
        if (r6 == r9) goto L_0x0118;
    L_0x00ce:
        if (r6 == r14) goto L_0x0118;
    L_0x00d0:
        if (r6 != r7) goto L_0x00d3;
    L_0x00d2:
        goto L_0x0118;
    L_0x00d3:
        if (r6 != r8) goto L_0x0130;
    L_0x00d5:
        r8 = 0;
        r11.b(r7, r8);
        r14 = 16;
        r11.b(r14, r9);
        r18 = "android.ss.intent.action.DOWNLOAD_OPEN";
        if (r5 == r10) goto L_0x0104;
    L_0x00e2:
        r10 = -4;
        if (r5 != r10) goto L_0x00e6;
    L_0x00e5:
        goto L_0x0104;
    L_0x00e6:
        r10 = -3;
        if (r5 != r10) goto L_0x0102;
    L_0x00e9:
        r0 = "notification_click_install_auto_cancel";
        r0 = r13.b(r0, r9);
        if (r0 != 0) goto L_0x0102;
    L_0x00f1:
        r11.b(r14, r8);
        r0 = r1.g;
        if (r0 <= 0) goto L_0x00ff;
    L_0x00f8:
        r11.b(r7, r8);
        r5 = r18;
        r0 = 0;
        goto L_0x0106;
    L_0x00ff:
        r11.b(r7, r9);
    L_0x0102:
        r0 = r18;
    L_0x0104:
        r5 = r0;
        r0 = 1;
    L_0x0106:
        r5 = r1.e(r5, r6, r12);
        r11.e = r5;
        r5 = "android.ss.intent.action.DOWNLOAD_HIDE";
        r5 = r1.e(r5, r6, r12);
        r8 = r11.l;
        r8.deleteIntent = r5;
        r5 = r0;
        goto L_0x0131;
    L_0x0118:
        r0 = r1.e(r0, r6, r12);
        r11.e = r0;
        if (r6 == r9) goto L_0x0126;
    L_0x0120:
        r5 = 4;
        if (r6 != r5) goto L_0x0124;
    L_0x0123:
        goto L_0x0126;
    L_0x0124:
        r0 = 0;
        goto L_0x0127;
    L_0x0126:
        r0 = 1;
    L_0x0127:
        r11.b(r7, r0);
        r5 = 16;
        r8 = 0;
        r11.b(r5, r8);
    L_0x0130:
        r5 = 1;
    L_0x0131:
        r7 = r1.b;
        r14 = r11;
        r10 = r1.c;
        if (r6 == r9) goto L_0x013b;
    L_0x0138:
        r9 = 4;
        if (r6 != r9) goto L_0x0149;
    L_0x013b:
        r16 = 0;
        r0 = (r10 > r16 ? 1 : (r10 == r16 ? 0 : -1));
        if (r0 <= 0) goto L_0x0149;
    L_0x0141:
        r19 = 100;
        r7 = r7 * r19;
        r7 = r7 / r10;
        r0 = (int) r7;
        r7 = r0;
        goto L_0x014a;
    L_0x0149:
        r7 = 0;
    L_0x014a:
        r0 = r1.d;
        r8 = android.text.TextUtils.isEmpty(r0);
        if (r8 == 0) goto L_0x015e;
    L_0x0152:
        r0 = "appdownloader_download_unknown_title";
        r0 = c.j.a.c.y.a.i.t(r0);
        r8 = r1.k;
        r0 = r8.getString(r0);
    L_0x015e:
        r8 = r0;
        r0 = "appdownloader_notification_layout";
        r9 = c.j.a.d.b.e.b.a();	 Catch:{ Exception -> 0x0178 }
        r9 = r9.getResources();	 Catch:{ Exception -> 0x0178 }
        r10 = "layout";
        r11 = c.j.a.d.b.e.b.a();	 Catch:{ Exception -> 0x0178 }
        r11 = r11.getPackageName();	 Catch:{ Exception -> 0x0178 }
        r0 = r9.getIdentifier(r0, r10, r11);	 Catch:{ Exception -> 0x0178 }
        goto L_0x017d;
    L_0x0178:
        r0 = move-exception;
        r0.printStackTrace();
        r0 = 0;
    L_0x017d:
        r9 = new android.widget.RemoteViews;
        r10 = r1.j;
        r10 = r10.getPackageName();
        r9.<init>(r10, r0);
        r0 = r1.j;	 Catch:{ all -> 0x01aa }
        r0 = c.j.a.d.a.h.h(r0);	 Catch:{ all -> 0x01aa }
        if (r0 == 0) goto L_0x01ab;
    L_0x0190:
        r0 = "appdownloader_root";
        r0 = c.j.a.c.y.a.i.z(r0);	 Catch:{ all -> 0x01aa }
        r10 = "appdownloader_notification_material_background_color";
        r10 = c.j.a.c.y.a.i.A(r10);	 Catch:{ all -> 0x01aa }
        r11 = r1.j;	 Catch:{ all -> 0x01aa }
        r11 = r11.getResources();	 Catch:{ all -> 0x01aa }
        r10 = r11.getColor(r10);	 Catch:{ all -> 0x01aa }
        r9.setInt(r0, r3, r10);	 Catch:{ all -> 0x01aa }
        goto L_0x01ab;
    L_0x01ab:
        r0 = new android.content.Intent;
        r10 = r1.j;
        r11 = com.ss.android.socialbase.appdownloader.DownloadHandlerService.class;
        r0.<init>(r10, r11);
        r10 = "android.ss.intent.action.DOWNLOAD_CLICK";
        r0.setAction(r10);
        r10 = r1.d;
        r11 = "notification_name";
        r0.putExtra(r11, r10);
        r10 = "extra_click_download_ids";
        r0.putExtra(r10, r12);
        r10 = "extra_click_download_type";
        r0.putExtra(r10, r6);
        r10 = c.j.a.c.y.a.i.D();
        r11 = r1.j;
        r19 = r14;
        r14 = 134217728; // 0x8000000 float:3.85186E-34 double:6.63123685E-316;
        r0 = android.app.PendingIntent.getService(r11, r12, r0, r14);
        r9.setOnClickPendingIntent(r10, r0);
        r0 = c.j.a.d.b.l.a.d(r12);
        r11 = "enable_notification_ui";
        r14 = 0;
        r0 = r0.b(r11, r14);
        r14 = "setBackgroundResource";
        r20 = r5;
        r5 = 1;
        if (r0 != r5) goto L_0x01f8;
    L_0x01ed:
        r0 = c.j.a.c.y.a.i.G();
        r9.setInt(r10, r14, r0);
        r5 = -1;
        r9.setTextColor(r10, r5);
    L_0x01f8:
        r0 = "appdownloader_desc";
        r0 = c.j.a.c.y.a.i.z(r0);
        r9.setTextViewText(r0, r8);
        r0 = r1.f(r12);
        r5 = 0;
        r9.setViewVisibility(r0, r5);
        r8 = 100;
        r10 = r24;
        r9.setProgressBar(r0, r8, r7, r10);
        r0 = "appdownloader_icon";
        r0 = c.j.a.c.y.a.i.z(r0);
        if (r15 == 0) goto L_0x021b;
    L_0x0218:
        r9.setImageViewResource(r0, r15);
    L_0x021b:
        r7 = c.j.a.d.b.l.a.d(r12);
        r7 = r7.b(r11, r5);
        r8 = 1;
        if (r7 != r8) goto L_0x0246;
    L_0x0226:
        r7 = c.j.a.d.a.j.d.a();
        r7 = r7.a;
        r8 = java.lang.Integer.valueOf(r12);
        r7 = r7.get(r8);
        r7 = (android.graphics.Bitmap) r7;
        if (r7 == 0) goto L_0x023f;
    L_0x0238:
        r9.setInt(r0, r3, r5);
        r9.setImageViewBitmap(r0, r7);
        goto L_0x0246;
    L_0x023f:
        r3 = c.j.a.c.y.a.i.G();
        r9.setInt(r0, r14, r3);
    L_0x0246:
        r0 = "appdownloader_download_success_size";
        r3 = "/";
        r5 = "";
        r7 = 8;
        r8 = 1;
        if (r6 == r8) goto L_0x041c;
    L_0x0251:
        r8 = 4;
        if (r6 != r8) goto L_0x0256;
    L_0x0254:
        goto L_0x041c;
    L_0x0256:
        r8 = 2;
        if (r6 != r8) goto L_0x02c4;
    L_0x0259:
        r2 = new java.lang.StringBuilder;
        r2.<init>();
        r5 = r1.b;
        r5 = c.j.a.d.a.h.f(r5);
        r2.append(r5);
        r2.append(r3);
        r5 = r1.c;
        r3 = c.j.a.d.a.h.f(r5);
        r2.append(r3);
        r5 = r2.toString();
        r2 = "appdownloader_notification_pausing";
        r2 = c.j.a.c.y.a.i.t(r2);
        r3 = r1.j;
        r3 = r3.getResources();
        r2 = r3.getString(r2);
        r3 = "appdownloader_notification_download_resume";
        r3 = c.j.a.c.y.a.i.t(r3);
        r6 = r1.j;
        r6 = r6.getResources();
        r3 = r6.getString(r3);
        r6 = r1.f(r12);
        r9.setViewVisibility(r6, r7);
        r6 = c.j.a.c.y.a.i.B();
        r9.setViewVisibility(r6, r7);
        r6 = c.j.a.c.y.a.i.C();
        r8 = 0;
        r9.setViewVisibility(r6, r8);
        r6 = c.j.a.c.y.a.i.D();
        r11 = r1.l;
        r11 = c.j.a.d.a.h.j(r11);
        if (r11 == 0) goto L_0x02bd;
    L_0x02b9:
        r9.setViewVisibility(r6, r7);
        goto L_0x02c0;
    L_0x02bd:
        r9.setViewVisibility(r6, r8);
    L_0x02c0:
        r11 = r19;
        goto L_0x049c;
    L_0x02c4:
        r3 = 3;
        if (r6 != r3) goto L_0x0416;
    L_0x02c7:
        r3 = c.j.a.d.b.e.b.a();
        r3 = c.j.a.d.b.e.i.a(r3);
        r3 = r3.k(r12);
        r6 = r1.e;
        r8 = "application/vnd.android.package-archive";
        r11 = -1;
        if (r6 == r11) goto L_0x0363;
    L_0x02da:
        r11 = -4;
        if (r6 != r11) goto L_0x02df;
    L_0x02dd:
        goto L_0x0363;
    L_0x02df:
        r11 = -3;
        if (r6 != r11) goto L_0x035d;
    L_0x02e2:
        r5 = r1.c;
        r2 = c.j.a.d.a.h.f(r5);
        if (r3 == 0) goto L_0x031b;
    L_0x02ea:
        r5 = r3.u;
        r5 = android.text.TextUtils.isEmpty(r5);
        if (r5 != 0) goto L_0x031b;
    L_0x02f2:
        r5 = r3.u;
        r5 = r5.equals(r8);
        if (r5 == 0) goto L_0x031b;
    L_0x02fa:
        r5 = r1.j;
        r3 = c.j.a.d.a.h.i(r5, r3);
        if (r3 == 0) goto L_0x0309;
    L_0x0302:
        r3 = "appdownloader_notification_install_finished_open";
        r3 = c.j.a.c.y.a.i.t(r3);
        goto L_0x030f;
    L_0x0309:
        r3 = "appdownloader_notification_download_complete_with_install";
        r3 = c.j.a.c.y.a.i.t(r3);
    L_0x030f:
        r5 = r1.k;
        r5 = r5.getString(r3);
        r11 = r19;
        r11.a(r5);
        goto L_0x033c;
    L_0x031b:
        r11 = r19;
        r3 = "appdownloader_notification_download_complete_without_install";
        r3 = c.j.a.c.y.a.i.t(r3);
        r5 = c.j.a.d.b.e.d.b();
        r5 = r5.i(r12);
        if (r5 == 0) goto L_0x0333;
    L_0x032d:
        r3 = "appdownloader_notification_download_complete_open";
        r3 = c.j.a.c.y.a.i.t(r3);
    L_0x0333:
        r5 = r1.k;
        r5 = r5.getString(r3);
        r11.a(r5);
    L_0x033c:
        r5 = r1.j;
        r5 = r5.getResources();
        r3 = r5.getString(r3);
        r5 = "appdownloader_notification_download_install";
        r5 = c.j.a.c.y.a.i.t(r5);
        r6 = r1.j;
        r6 = r6.getResources();
        r5 = r6.getString(r5);
        r21 = r5;
        r5 = r3;
        r3 = r21;
        goto L_0x03f2;
    L_0x035d:
        r11 = r19;
        r2 = r5;
        r3 = r2;
        goto L_0x03f2;
    L_0x0363:
        r11 = r19;
        r6 = c.j.a.c.y.a.i.z(r0);
        r9.setViewVisibility(r6, r7);
        if (r2 == 0) goto L_0x0385;
    L_0x036e:
        r6 = r2.a;
        r14 = 1006; // 0x3ee float:1.41E-42 double:4.97E-321;
        if (r6 != r14) goto L_0x0385;
    L_0x0374:
        r2 = "appdownloader_notification_download_space_failed";
        r2 = c.j.a.c.y.a.i.t(r2);
        r3 = r1.j;
        r3 = r3.getResources();
        r2 = r3.getString(r2);
        goto L_0x03dd;
    L_0x0385:
        if (r2 == 0) goto L_0x03a7;
    L_0x0387:
        r2 = r2.a;
        r6 = 1013; // 0x3f5 float:1.42E-42 double:5.005E-321;
        if (r2 == r6) goto L_0x0391;
    L_0x038d:
        r6 = 1049; // 0x419 float:1.47E-42 double:5.183E-321;
        if (r2 != r6) goto L_0x03a7;
    L_0x0391:
        if (r3 == 0) goto L_0x03a7;
    L_0x0393:
        r2 = r3.u;
        r2 = r8.contains(r2);
        if (r2 == 0) goto L_0x03a7;
    L_0x039b:
        r2 = "notification_text_opt";
        r6 = 0;
        r2 = r13.b(r2, r6);
        r6 = 1;
        if (r2 != r6) goto L_0x03a7;
    L_0x03a5:
        r2 = 1;
        goto L_0x03a8;
    L_0x03a7:
        r2 = 0;
    L_0x03a8:
        if (r2 == 0) goto L_0x03cd;
    L_0x03aa:
        if (r3 == 0) goto L_0x03b2;
    L_0x03ac:
        r2 = r3.g;
        if (r2 == 0) goto L_0x03b2;
    L_0x03b0:
        r2 = 1;
        goto L_0x03b3;
    L_0x03b2:
        r2 = 0;
    L_0x03b3:
        if (r2 == 0) goto L_0x03bc;
    L_0x03b5:
        r2 = "appdownloader_notification_download_waiting_wifi";
        r2 = c.j.a.c.y.a.i.t(r2);
        goto L_0x03c2;
    L_0x03bc:
        r2 = "appdownloader_notification_download_waiting_net";
        r2 = c.j.a.c.y.a.i.t(r2);
    L_0x03c2:
        r3 = r1.j;
        r3 = r3.getResources();
        r2 = r3.getString(r2);
        goto L_0x03dd;
    L_0x03cd:
        r2 = "appdownloader_notification_download_failed";
        r2 = c.j.a.c.y.a.i.t(r2);
        r3 = r1.j;
        r3 = r3.getResources();
        r2 = r3.getString(r2);
    L_0x03dd:
        r3 = "appdownloader_notification_download_restart";
        r3 = c.j.a.c.y.a.i.t(r3);
        r6 = r1.j;
        r6 = r6.getResources();
        r3 = r6.getString(r3);
        r21 = r5;
        r5 = r2;
        r2 = r21;
    L_0x03f2:
        r6 = r1.f(r12);
        r9.setViewVisibility(r6, r7);
        r6 = c.j.a.c.y.a.i.B();
        r8 = 0;
        r9.setViewVisibility(r6, r8);
        r6 = c.j.a.c.y.a.i.C();
        r9.setViewVisibility(r6, r7);
        r6 = c.j.a.c.y.a.i.D();
        r9.setViewVisibility(r6, r7);
        r21 = r5;
        r5 = r2;
        r2 = r21;
        goto L_0x049c;
    L_0x0416:
        r11 = r19;
        r2 = r5;
        r3 = r2;
        goto L_0x049c;
    L_0x041c:
        r11 = r19;
        r2 = new java.lang.StringBuilder;
        r2.<init>();
        r13 = r1.b;
        r5 = c.j.a.d.a.h.f(r13);
        r2.append(r5);
        r2.append(r3);
        r13 = r1.c;
        r3 = c.j.a.d.a.h.f(r13);
        r2.append(r3);
        r5 = r2.toString();
        r2 = 1;
        if (r6 != r2) goto L_0x0453;
    L_0x043f:
        r2 = r1.e;
        r3 = 11;
        if (r2 != r3) goto L_0x044c;
    L_0x0445:
        r2 = "appdownloader_notification_waiting_download_complete_handler";
        r2 = c.j.a.c.y.a.i.t(r2);
        goto L_0x0459;
    L_0x044c:
        r2 = "appdownloader_notification_downloading";
        r2 = c.j.a.c.y.a.i.t(r2);
        goto L_0x0459;
    L_0x0453:
        r2 = "appdownloader_notification_prepare";
        r2 = c.j.a.c.y.a.i.t(r2);
    L_0x0459:
        r3 = r1.j;
        r3 = r3.getResources();
        r2 = r3.getString(r2);
        r3 = "appdownloader_notification_download_pause";
        r3 = c.j.a.c.y.a.i.t(r3);
        r6 = r1.j;
        r6 = r6.getResources();
        r3 = r6.getString(r3);
        r6 = r1.f(r12);
        r8 = 0;
        r9.setViewVisibility(r6, r8);
        r6 = c.j.a.c.y.a.i.B();
        r9.setViewVisibility(r6, r7);
        r6 = c.j.a.c.y.a.i.C();
        r9.setViewVisibility(r6, r8);
        r6 = c.j.a.c.y.a.i.D();
        r12 = r1.l;
        r12 = c.j.a.d.a.h.j(r12);
        if (r12 == 0) goto L_0x0499;
    L_0x0495:
        r9.setViewVisibility(r6, r7);
        goto L_0x049c;
    L_0x0499:
        r9.setViewVisibility(r6, r8);
    L_0x049c:
        r6 = "appdownloader_download_size";
        r6 = c.j.a.c.y.a.i.z(r6);
        r9.setTextViewText(r6, r5);
        r6 = "appdownloader_download_status";
        r6 = c.j.a.c.y.a.i.z(r6);
        r9.setTextViewText(r6, r2);
        r0 = c.j.a.c.y.a.i.z(r0);
        r9.setTextViewText(r0, r5);
        r0 = "appdownloader_download_success_status";
        r0 = c.j.a.c.y.a.i.z(r0);
        r9.setTextViewText(r0, r2);
        r0 = c.j.a.c.y.a.i.D();
        r9.setTextViewText(r0, r3);
        r0 = new java.util.ArrayList;
        r0.<init>();
        r0 = new android.os.Bundle;
        r0.<init>();
        r2 = 26;
        if (r4 < r2) goto L_0x04dd;
    L_0x04d3:
        r2 = new android.app.Notification$Builder;
        r3 = r11.a;
        r5 = r11.j;
        r2.<init>(r3, r5);
        goto L_0x04e4;
    L_0x04dd:
        r2 = new android.app.Notification$Builder;
        r3 = r11.a;
        r2.<init>(r3);
    L_0x04e4:
        r3 = r11.l;
        r5 = r3.when;
        r5 = r2.setWhen(r5);
        r6 = r3.icon;
        r8 = r3.iconLevel;
        r5 = r5.setSmallIcon(r6, r8);
        r6 = r3.contentView;
        r5 = r5.setContent(r6);
        r6 = r3.tickerText;
        r8 = 0;
        r5 = r5.setTicker(r6, r8);
        r6 = r3.vibrate;
        r5 = r5.setVibrate(r6);
        r6 = r3.ledARGB;
        r8 = r3.ledOnMS;
        r12 = r3.ledOffMS;
        r5 = r5.setLights(r6, r8, r12);
        r6 = r3.flags;
        r8 = 2;
        r6 = r6 & r8;
        if (r6 == 0) goto L_0x0519;
    L_0x0517:
        r6 = 1;
        goto L_0x051a;
    L_0x0519:
        r6 = 0;
    L_0x051a:
        r5 = r5.setOngoing(r6);
        r6 = r3.flags;
        r6 = r6 & r7;
        if (r6 == 0) goto L_0x0525;
    L_0x0523:
        r6 = 1;
        goto L_0x0526;
    L_0x0525:
        r6 = 0;
    L_0x0526:
        r5 = r5.setOnlyAlertOnce(r6);
        r6 = r3.flags;
        r7 = 16;
        r6 = r6 & r7;
        if (r6 == 0) goto L_0x0533;
    L_0x0531:
        r6 = 1;
        goto L_0x0534;
    L_0x0533:
        r6 = 0;
    L_0x0534:
        r5 = r5.setAutoCancel(r6);
        r6 = r3.defaults;
        r5 = r5.setDefaults(r6);
        r6 = 0;
        r5 = r5.setContentTitle(r6);
        r7 = r11.d;
        r5 = r5.setContentText(r7);
        r5 = r5.setContentInfo(r6);
        r7 = r11.e;
        r5 = r5.setContentIntent(r7);
        r7 = r3.deleteIntent;
        r5 = r5.setDeleteIntent(r7);
        r7 = r3.flags;
        r7 = r7 & 128;
        if (r7 == 0) goto L_0x0561;
    L_0x055f:
        r7 = 1;
        goto L_0x0562;
    L_0x0561:
        r7 = 0;
    L_0x0562:
        r5 = r5.setFullScreenIntent(r6, r7);
        r5 = r5.setLargeIcon(r6);
        r7 = 0;
        r5 = r5.setNumber(r7);
        r5.setProgress(r7, r7, r7);
        r5 = r2.setSubText(r6);
        r5 = r5.setUsesChronometer(r7);
        r5.setPriority(r7);
        r5 = r11.b;
        r5 = r5.iterator();
    L_0x0583:
        r6 = r5.hasNext();
        r7 = "android.support.allowGeneratedReplies";
        r8 = 29;
        if (r6 == 0) goto L_0x05d9;
    L_0x058d:
        r6 = r5.next();
        r6 = (b.i.b.g) r6;
        java.util.Objects.requireNonNull(r6);
        r6 = 23;
        if (r4 < r6) goto L_0x05a2;
    L_0x059a:
        r6 = new android.app.Notification$Action$Builder;
        r12 = 0;
        r6.<init>(r12, r12, r12);
        r13 = 0;
        goto L_0x05a9;
    L_0x05a2:
        r12 = 0;
        r6 = new android.app.Notification$Action$Builder;
        r13 = 0;
        r6.<init>(r13, r12, r12);
    L_0x05a9:
        r12 = new android.os.Bundle;
        r12.<init>();
        r12.putBoolean(r7, r13);
        r7 = 24;
        if (r4 < r7) goto L_0x05b8;
    L_0x05b5:
        r6.setAllowGeneratedReplies(r13);
    L_0x05b8:
        r7 = "android.support.action.semanticAction";
        r12.putInt(r7, r13);
        r7 = 28;
        if (r4 < r7) goto L_0x05c4;
    L_0x05c1:
        r6.setSemanticAction(r13);
    L_0x05c4:
        if (r4 < r8) goto L_0x05c9;
    L_0x05c6:
        r6.setContextual(r13);
    L_0x05c9:
        r7 = "android.support.action.showsUserInterface";
        r12.putBoolean(r7, r13);
        r6.addExtras(r12);
        r6 = r6.build();
        r2.addAction(r6);
        goto L_0x0583;
    L_0x05d9:
        r5 = r11.i;
        if (r5 == 0) goto L_0x05e0;
    L_0x05dd:
        r0.putAll(r5);
    L_0x05e0:
        r5 = r11.f;
        r2.setShowWhen(r5);
        r5 = 0;
        r6 = r2.setLocalOnly(r5);
        r12 = r11.g;
        r6 = r6.setGroup(r12);
        r12 = r11.h;
        r6 = r6.setGroupSummary(r12);
        r12 = 0;
        r6.setSortKey(r12);
        r6 = r2.setCategory(r12);
        r6 = r6.setColor(r5);
        r6 = r6.setVisibility(r5);
        r5 = r6.setPublicVersion(r12);
        r6 = r3.sound;
        r3 = r3.audioAttributes;
        r5.setSound(r6, r3);
        r3 = r11.m;
        r3 = r3.iterator();
    L_0x0617:
        r5 = r3.hasNext();
        if (r5 == 0) goto L_0x0627;
    L_0x061d:
        r5 = r3.next();
        r5 = (java.lang.String) r5;
        r2.addPerson(r5);
        goto L_0x0617;
    L_0x0627:
        r3 = r11.c;
        r3 = r3.size();
        if (r3 <= 0) goto L_0x06bf;
    L_0x062f:
        r3 = r11.i;
        if (r3 != 0) goto L_0x063a;
    L_0x0633:
        r3 = new android.os.Bundle;
        r3.<init>();
        r11.i = r3;
    L_0x063a:
        r3 = r11.i;
        r5 = "android.car.EXTENSIONS";
        r3 = r3.getBundle(r5);
        if (r3 != 0) goto L_0x0649;
    L_0x0644:
        r3 = new android.os.Bundle;
        r3.<init>();
    L_0x0649:
        r6 = new android.os.Bundle;
        r6.<init>();
        r12 = 0;
    L_0x064f:
        r13 = r11.c;
        r13 = r13.size();
        if (r12 >= r13) goto L_0x06a7;
    L_0x0657:
        r13 = java.lang.Integer.toString(r12);
        r14 = r11.c;
        r14 = r14.get(r12);
        r14 = (b.i.b.g) r14;
        r15 = b.i.b.i.a;
        r15 = new android.os.Bundle;
        r15.<init>();
        java.util.Objects.requireNonNull(r14);
        r14 = "icon";
        r10 = 0;
        r15.putInt(r14, r10);
        r14 = "title";
        r8 = 0;
        r15.putCharSequence(r14, r8);
        r14 = "actionIntent";
        r15.putParcelable(r14, r8);
        r14 = new android.os.Bundle;
        r14.<init>();
        r14.putBoolean(r7, r10);
        r10 = "extras";
        r15.putBundle(r10, r14);
        r10 = b.i.b.i.a(r8);
        r8 = "remoteInputs";
        r15.putParcelableArray(r8, r10);
        r8 = "showsUserInterface";
        r10 = 0;
        r15.putBoolean(r8, r10);
        r8 = "semanticAction";
        r15.putInt(r8, r10);
        r6.putBundle(r13, r15);
        r12 = r12 + 1;
        r8 = 29;
        goto L_0x064f;
    L_0x06a7:
        r7 = "invisible_actions";
        r3.putBundle(r7, r6);
        r6 = r11.i;
        if (r6 != 0) goto L_0x06b7;
    L_0x06b0:
        r6 = new android.os.Bundle;
        r6.<init>();
        r11.i = r6;
    L_0x06b7:
        r6 = r11.i;
        r6.putBundle(r5, r3);
        r0.putBundle(r5, r3);
    L_0x06bf:
        r3 = 24;
        if (r4 < r3) goto L_0x06ce;
    L_0x06c3:
        r3 = r11.i;
        r3 = r2.setExtras(r3);
        r5 = 0;
        r3.setRemoteInputHistory(r5);
        goto L_0x06cf;
    L_0x06ce:
        r5 = 0;
    L_0x06cf:
        r3 = 26;
        if (r4 < r3) goto L_0x06fc;
    L_0x06d3:
        r3 = 0;
        r6 = r2.setBadgeIconType(r3);
        r6 = r6.setShortcutId(r5);
        r7 = 0;
        r6 = r6.setTimeoutAfter(r7);
        r6.setGroupAlertBehavior(r3);
        r6 = r11.j;
        r6 = android.text.TextUtils.isEmpty(r6);
        if (r6 != 0) goto L_0x06fc;
    L_0x06ed:
        r6 = r2.setSound(r5);
        r6 = r6.setDefaults(r3);
        r6 = r6.setLights(r3, r3, r3);
        r6.setVibrate(r5);
    L_0x06fc:
        r3 = 29;
        if (r4 < r3) goto L_0x0708;
    L_0x0700:
        r3 = r11.k;
        r2.setAllowSystemGeneratedContextualActions(r3);
        r2.setBubbleMetadata(r5);
    L_0x0708:
        r3 = 26;
        if (r4 < r3) goto L_0x0711;
    L_0x070c:
        r0 = r2.build();
        goto L_0x0721;
    L_0x0711:
        r3 = 24;
        if (r4 < r3) goto L_0x071a;
    L_0x0715:
        r0 = r2.build();
        goto L_0x0721;
    L_0x071a:
        r2.setExtras(r0);
        r0 = r2.build();
    L_0x0721:
        if (r20 == 0) goto L_0x072d;
    L_0x0723:
        r2 = r0.flags;
        r3 = 2;
        r2 = r2 | r3;
        r0.flags = r2;
        r2 = 1;
        r1.h = r2;
        goto L_0x0730;
    L_0x072d:
        r2 = 0;
        r1.h = r2;
    L_0x0730:
        r0.contentView = r9;
        return r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.j.a.d.a.j.a.g(com.ss.android.socialbase.downloader.e.a, boolean):android.app.Notification");
    }
}
